package com.farm.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.farm.common.R;
import com.farm.pojo.SpiderData;
import com.farm.pojo.Vo.SpiderDataVo;
import com.farm.service.AnalyseService;
import com.farm.service.SpiderDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author farm
 * @since 2024-08-10
 */
@RestController
@RequestMapping("/spiderdata")
public class SpiderDataController {

    @Autowired
    private SpiderDataService spiderDataService;

    @Autowired
    private AnalyseService analyseService;

    @GetMapping("/getData")
    public R<Page<SpiderData>>getData(int current, int size,String type){
        return R.success(spiderDataService.getShowList(current,size,type));
    }

    @GetMapping("/analyzeData")
    public SpiderDataVo analyzeData(String name,String specification){
        return analyseService.analyzeFish(name,specification);
    }
}

